package com.king.designpatterns.行为模式.访问者模式;

/**
 * 具体元素
 *
 * @author king
 * @date 2021-06-11 11:21
 */
public class CPU extends Hardware{
    public CPU(String type) {
        super(type);
    }

    @Override
    public void run() {
        System.out.println("型号为" + type + "的CPU正在运转");
    }

    @Override
    public void accept(ComputerVisitor computerVisitor) {
        computerVisitor.vistCPU(this);
    }
}
